<template>
  <div class="page_body">
    <HomeTop :topTitle="topTitle"></HomeTop>
    <div class="check_system_body">
      <div class="check_system_list">
        <img
          class="check_system_list_img"
          src="../../assets/image/gongsi.png"
          @click="toSearch()"
        />
        <img
          class="check_system_list_img"
          src="../../assets/image/check_system_img01.png"
          @click="toOther()"
        />
        <img
          class="check_system_list_img"
          src="../../assets/image/check_system_img02.png"
          @click="toHome()"
        />
        <img
          class="check_system_list_img"
          src="../../assets/image/check_system_img03.png"
          @click="toRefereeHome()"
        />
        <img
          class="check_system_list_img"
          src="../../assets/image/lqss.png"
          @click="togame()"
        />
        <!-- <img
          @click="toMainUserCenter()"
          class="check_system_list_img"
          src="../../assets/image/check_system_img04.png"
        /> -->

        <img
          @click="tomemberlist()"
          class="check_system_list_img"
          src="../../assets/image/huiyuan.png"
        />
      </div>
    </div>
  </div>
</template>
<style src="../../assets/css/home/checkSystem.css" scoped></style>
<script>
import { Indicator, Toast } from "mint-ui";
import HomeTop from "@/components/homeTop.vue";
import wx from "weixin-js-sdk";
export default {
  name: "CheckSystem",
  components: {
    HomeTop,
  },
  data() {
    return {
      topTitle: "选择系统", // 顶部组件参数设置
    };
  },
  created: function () {
    this.toJumpMini();
    this.checkUserInfoFn();
  },
  methods: {
    // 查询用户信息完善状态
    checkUserInfoFn: function () {
      let that = this;
      let url = "/mobile/checkUserInfo";
      let data = {};
      Indicator.open();
      this.axios
        .post(url, data)
        .then((response) => {
          Indicator.close();
          if (response.code == 0) {
            that.$store.commit("set_isRegister", response.is_complete);
          } else {
            Toast({
              message: response.msg,
              duration: 3000,
            });
          }
        })
        .catch(function (error) {
          Indicator.close();
          console.log(error);
        });
    },
    toSearch: function () {
      this.$router.push({
        name: "searchCenter",
      });
      // Toast({
      //   message: "暂未开放",
      //   duration: 3000,
      // });
    },
    // 前往青少年
    toOther: function () {
      window.location.href = "https://shslqxh.1meeting.com";
    },

    // 前往教练员首页
    toHome: function () {
      this.$router.push({
        name: "CoachHome",
      });
    },
    //前往篮球赛事
    togame: function () {
      window.location.href = "https://shslqxh.1meeting.com/event";
    },
    // 前往裁判员首页
    toRefereeHome: function () {
      this.$router.push({
        name: "RefereeHome",
      });
    },
    // 前往总个人中心
    toMainUserCenter: function () {
      this.$router.push({
        name: "MainUserCenter",
      });
    },

    // 前往会员中心
    tomemberlist: function () {
      this.$router.push({
        name: "memberlist",
      });
    },
    // 跳转小程序首页
    toJumpMini: function () {
      console.log("jump to mini...");
      wx.miniProgram.redirectTo({
        url: "/pages/entrance/entrance",
      });
    },
  },
};
</script>
